package com.taobao.api.request;

import com.taobao.api.internal.util.RequestCheckUtils;
import java.util.Map;

import com.taobao.api.ApiRuleException;
import com.taobao.api.BaseTaobaoRequest;
import com.taobao.api.internal.util.TaobaoHashMap;

import com.taobao.api.response.TmallExchangeReturngoodsAgreeResponse;

/**
 * TOP API: tmall.exchange.returngoods.agree request
 * 
 * @author top auto create
 * @since 1.0, 2018.08.09
 */
public class TmallExchangeReturngoodsAgreeRequest extends BaseTaobaoRequest<TmallExchangeReturngoodsAgreeResponse> {
	
	

	/** 
	* 换货单号ID
	 */
	private Long disputeId;

	/** 
	* 返回字段。目前支持dispute_id（换货单号ID）,bizorder_id（正向交易单号ID）, modified（订单修改时间）, status（当前换货状态）
	 */
	private String fields;

	public void setDisputeId(Long disputeId) {
		this.disputeId = disputeId;
	}

	public Long getDisputeId() {
		return this.disputeId;
	}

	public void setFields(String fields) {
		this.fields = fields;
	}

	public String getFields() {
		return this.fields;
	}

	public String getApiMethodName() {
		return "tmall.exchange.returngoods.agree";
	}

	public Map<String, String> getTextParams() {		
		TaobaoHashMap txtParams = new TaobaoHashMap();
		txtParams.put("dispute_id", this.disputeId);
		txtParams.put("fields", this.fields);
		if(this.udfParams != null) {
			txtParams.putAll(this.udfParams);
		}
		return txtParams;
	}

	public Class<TmallExchangeReturngoodsAgreeResponse> getResponseClass() {
		return TmallExchangeReturngoodsAgreeResponse.class;
	}

	public void check() throws ApiRuleException {
		RequestCheckUtils.checkNotEmpty(disputeId, "disputeId");
		RequestCheckUtils.checkNotEmpty(fields, "fields");
		RequestCheckUtils.checkMaxListSize(fields, 100, "fields");
	}
	

}